﻿Public Class MDI 

    Private Sub BarButtonItem4_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btCurso.ItemClick
        My.Forms.fcursos.MdiParent = Me
        My.Forms.fcursos.Show()
    End Sub

    Private Sub BarButtonItem1_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
        My.Forms.fdocumento.MdiParent = Me
        My.Forms.fdocumento.Show()
    End Sub

    Private Sub MDI_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        conexion.Close()
    End Sub

    Private Sub MDI_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        conexion.Close()
    End Sub

    Private Sub btSeccion_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btSeccion.ItemClick
        My.Forms.fseccion.MdiParent = Me
        My.Forms.fseccion.Show()
    End Sub

    Private Sub btArea_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btArea.ItemClick
        My.Forms.fArea.MdiParent = Me
        My.Forms.fArea.Show()
    End Sub

    Private Sub btAmLeve_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btAmLeve.ItemClick
        My.Forms.FamonLeve.MdiParent = Me
        My.Forms.FamonLeve.Show()
    End Sub

    Private Sub btEmpleado_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btEmpleado.ItemClick
        My.Forms.AgregarEmpleado.MdiParent = Me
        My.Forms.AgregarEmpleado.Show()
    End Sub

    Private Sub btCargo_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btCargo.ItemClick
        My.Forms.AgregarCargo.MdiParent = Me
        My.Forms.AgregarCargo.Show()
    End Sub

    Private Sub btEtnia_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btEtnia.ItemClick
        My.Forms.AgregarEtnia.MdiParent = Me
        My.Forms.AgregarEtnia.Show()
    End Sub

    Private Sub btNivEstudio_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btNivEstudio.ItemClick
        My.Forms.AgregarNivelDeEstudio.MdiParent = Me
        My.Forms.AgregarNivelDeEstudio.Show()
    End Sub

    Private Sub btOcupacion_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btOcupacion.ItemClick
        My.Forms.AgregarOcupacion.MdiParent = Me
        My.Forms.AgregarOcupacion.Show()
    End Sub

    Private Sub btPlanEst_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btPlanEst.ItemClick
        My.Forms.AgregarPlanEstudio.MdiParent = Me
        My.Forms.AgregarPlanEstudio.Show()
    End Sub

    Private Sub btReligion_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btReligion.ItemClick
        My.Forms.AgregarReligion.MdiParent = Me
        My.Forms.AgregarReligion.Show()
    End Sub

    Private Sub btSalud_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btSalud.ItemClick
        My.Forms.AgregarSalud.MdiParent = Me
        My.Forms.AgregarSalud.Show()
    End Sub

    Private Sub btJornada_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btJornada.ItemClick
        My.Forms.AgregarJornada.MdiParent = Me
        My.Forms.AgregarJornada.Show()
    End Sub

    Private Sub btPais_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btPais.ItemClick
        My.Forms.AgregarPais.MdiParent = Me
        My.Forms.AgregarPais.Show()
    End Sub

    Private Sub btDepto_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btDepto.ItemClick
        My.Forms.AgregarDepartamento.MdiParent = Me
        My.Forms.AgregarDepartamento.Show()
    End Sub

    Private Sub btMuni_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btMuni.ItemClick
        My.Forms.AgregarMunicipio.MdiParent = Me
        My.Forms.AgregarMunicipio.Show()
    End Sub


    Private Sub BarButtonItem2_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles btHora.ItemClick
        My.Forms.AgregarHora.MdiParent = Me
        My.Forms.AgregarHora.Show()

    End Sub
End Class